<?php


namespace App\Kuafu\Shop\Enum;


class CodeEnum
{
    const SHOP_OLD_APPLE_ID = "wx29b9236a6d419e0c"; // 4月底 删除

    const TYPE_DIRECT = 2;
    const TYPE_JOIN   = 1;

    const TYPE_MAP = [
        self::TYPE_JOIN   => '加盟',
        self::TYPE_DIRECT => '直营'
    ];

    const PREFIX_PLATFORM_ID = 'PLATFORM_ID';
    const PREFIX_SHOP_ID     = "SHOP_ID";

    /**
     * 营业/不营业状态 - 对外的一个枚举，不是数据库状态
     */
    const OPEN_STATUS_START    = 0; // 营业
    const OPEN_STATUS_END      = 1; // 不在营业时间
    const OPEN_STATUS_TIME_END = 2; // 在营业时间，手动关店

    const SHOP_ALL          = 0; //全部门店
    const SHOP_TEMP_NO_INFO = '暂无数据';

    const PRINTER_DEVICE_INDEX = 0; //默认配置ID
    const PRINTER_PORT         = 9100; //默认打印机端口

    const PRINTER_TYPE_CASHIER = 0;
    const PRINTER_TYPE_KITCHEN = 1;
    const PRINTER_TYPE_LABEL   = 2;

    const PRINTER_TYPE = [
        self::PRINTER_TYPE_CASHIER => '收银',
        self::PRINTER_TYPE_KITCHEN => '后厨',
        self::PRINTER_TYPE_LABEL   => '标签打印',
    ];

    /**
     * 启用/禁用/筹备中状态 - status
     */
    const SHOP_STATUS_NORMAL  = 0; // 启用
    const SHOP_STATUS_BAN     = 1; // 禁用
    const SHOP_STATUS_PREPARE = 2; // 筹备中

    const SHOP_STATUS_TEXT = [
        self::SHOP_STATUS_NORMAL  => '启用',
        self::SHOP_STATUS_BAN     => '禁用',
        self::SHOP_STATUS_PREPARE => '筹备中',
    ];

    /**
     * 营业/不营业状态 - is_business
     */
    const SHOP_BUSINESS_STATUS_NORMAL  = 1;
    const SHOP_BUSINESS_STATUS_SUSPEND = 0;

    const SHOP_BUSINESS_STATUS_TEXT = [
        self::SHOP_BUSINESS_STATUS_NORMAL  => '正常营业',
        self::SHOP_BUSINESS_STATUS_SUSPEND => '暂停营业'
    ];

    /**
     * 小程序状态 - applet_status
     */
    const SHOP_APPLET_STATUS_NORMAL  = 0;
    const SHOP_APPLET_STATUS_SUSPEND = 1;

    const SHOP_APPLET_STATUS_TEXT = [
        self::SHOP_APPLET_STATUS_NORMAL  => '正常营业',
        self::SHOP_APPLET_STATUS_SUSPEND => '暂停营业'

    ];


    const PRINTER_STATUS_NORMAL       = 0;
    const PRINTER_STATUS_NO_USE       = 1;
    const PRINTER_STATUS_PRODUCTION   = 2;
    const PRINTER_STATUS_DISCONNECTED = 3;
    const PRINTER_STATUS_OTHER        = 4;

    const PRINTER_STATUS = [
        self::PRINTER_STATUS_NORMAL       => '启用',
        self::PRINTER_STATUS_NO_USE       => '未启用',
        self::PRINTER_STATUS_PRODUCTION   => '连接生产',
        self::PRINTER_STATUS_DISCONNECTED => '断开连接',
        self::PRINTER_STATUS_OTHER        => '其他',
    ];

    const PRINTER_DEVICE_DEFAULT   = 0;
    const PRINTER_DEVICE_USB       = 1;
    const PRINTER_DEVICE_WIFI      = 2;
    const PRINTER_DEVICE_BLUETOOTH = 3;
    const PRINTER_DEVICE_NETWORK   = 4;

    const PRINTER_DEVICE = [
        self::PRINTER_DEVICE_DEFAULT   => '默认',
        self::PRINTER_DEVICE_USB       => 'USB',
        self::PRINTER_DEVICE_WIFI      => 'WIFI',
        self::PRINTER_DEVICE_BLUETOOTH => '蓝牙',
        self::PRINTER_DEVICE_NETWORK   => '网络',
    ];


    const SHOP_INVOICE_CODE_0 = 'default'; // 不打印
    const SHOP_INVOICE_CODE_1 = 'moredo'; // 盟度

    const SHOP_CAMERA_TYPE_0 = 0; // 默认
    const SHOP_CAMERA_TYPE_1 = 1; // 客流
    const SHOP_CAMERA_TYPE_2 = 2; // 普通相机

    const SHOP_CAMERA_TYPE_TEXT = [
//        self::SHOP_CAMERA_TYPE_0 => '默认',
        self::SHOP_CAMERA_TYPE_1 => '客流',
        self::SHOP_CAMERA_TYPE_2 => '普通相机',
    ];

    const SHOP_CAMERA_TRIPLE_TYPE_0 = 0; // 默认
    const SHOP_CAMERA_TRIPLE_TYPE_1 = 1; // 摄像头三元组
    const SHOP_CAMERA_TRIPLE_TYPE_2 = 2; // NVR 三元组

    const SHOP_CAMERA_TRIPLE_TYPE_TEXT = [
//        self::SHOP_CAMERA_TRIPLE_TYPE_0 => '默认',
        self::SHOP_CAMERA_TRIPLE_TYPE_1 => '摄像头三元组',
        self::SHOP_CAMERA_TRIPLE_TYPE_2 => 'NVR 三元组'
    ];

    const SHOP_CASH_REGISTER_STATUS_OK        = 0;
    const SHOP_CASH_REGISTER_STATUS_OFF       = 1;
    const SHOP_CASH_REGISTER_STATUS_CHECK_OFF = 2;
    const SHOP_CASH_REGISTER_STATUS_FEE_OFF   = 3;
    const SHOP_EXPIRED_OFF                    = 4;

    const SHOP_CASH_REGISTER_STATUS_MAPPING = [
        self::SHOP_CASH_REGISTER_STATUS_OK        => '正常',
        self::SHOP_CASH_REGISTER_STATUS_OFF       => '手动关闭',
        self::SHOP_CASH_REGISTER_STATUS_CHECK_OFF => '稽核关闭',
        self::SHOP_CASH_REGISTER_STATUS_FEE_OFF   => '年费关闭',
        self::SHOP_EXPIRED_OFF                    => '合同到期关闭',
    ];

    /**
     * 流畅
     */
    const CLARITY_TYPE_FLUENCY = 1;

    /**
     * 高清
     */
    const CLARITY_TYPE_HIGH_DEFINITION = 2;
    const CLARITY_TYPE_SUPER_CLEAR     = 3;

    const CLARITY_TYPE_TEXT = [
        self::CLARITY_TYPE_FLUENCY         => '流畅',
        self::CLARITY_TYPE_HIGH_DEFINITION => '高清',
    ];

    /**
     * 门店摄像头状态 0-缺失 1-在线 2-离线 3-部分在线
     */
    const SHOP_CAMERA_STATUS_NOT_FOUND      = 0;
    const SHOP_CAMERA_STATUS_ONLINE         = 1;
    const SHOP_CAMERA_STATUS_OFF_ONLINE     = 2;
    const SHOP_CAMERA_STATUS_PARTIAL_ONLINE = 3;

    const SHOP_CAMERA_STATUS_TYPE_TEXT = [
        self::SHOP_CAMERA_STATUS_NOT_FOUND      => '缺失',// 未绑定
        self::SHOP_CAMERA_STATUS_ONLINE         => '在线',
        self::SHOP_CAMERA_STATUS_OFF_ONLINE     => '离线',
        self::SHOP_CAMERA_STATUS_PARTIAL_ONLINE => '部分在线',
    ];

    /**
     * 观远门店状态 1-正常营业 2-暂停营业 3-筹备中 4-选址中
     */
    const SHOP_GUANYUAN_STATUS_DEFAULT_BUSINESS = 1;
    const SHOP_GUANYUAN_STATUS_OFF_BUSINESS     = 2;
    const SHOP_GUANYUAN_STATUS_PREPARATION      = 3;
    const SHOP_GUANYUAN_STATUS_SITE             = 4;

    const SHOP_GUANYUAN_STATUS_TYPE_TEXT = [
        self::SHOP_GUANYUAN_STATUS_DEFAULT_BUSINESS => '正常营业',
        self::SHOP_GUANYUAN_STATUS_OFF_BUSINESS     => '暂停营业',
        self::SHOP_GUANYUAN_STATUS_PREPARATION      => '筹备中',
        self::SHOP_GUANYUAN_STATUS_SITE             => '选址中',
    ];
}
